<extend name="./base" />
<block name="pageContent">
    <link rel="stylesheet" href="{$Think.config.DOMAIN_URL}/Public/AdminTpl/css/s-settle.css">
    <div class="main-content">
        <!-- 头部面包屑导航条 -->
        <div class="breadcrumbs" id="breadcrumbs">
            <!--导航路径列表-->
            <ul class="breadcrumb no-margin-left">
                <li>
                    <a>管理后台</a>
                </li>
                <li class="action">
                    交易管理
                </li>
            </ul>
        </div>
        <!--页面容器-->
        <div class="page-content">
            <div class="nav-tab" style="position: relative">
                <ul class="nav-tab-title ">
                    <li class="nav-this">持仓列表</li>
                </ul>
            </div>
            <div class="row">
                <div class="col-xs-12">
                    <form class="form-horizontal s_input-bgcolor" method="post" action="{$Think.config.DOMAIN_URL}/trade/index">
                        <div class="col-lg-3 col-md-6 col-sm-12 col-xs-12 pad-b20">
                            <div class="form-group">
                                <label class="col-sm-3 control-label text-right no-padding-right"
                                       for="form-field-1-1">用户： </label>
                                <div class="col-sm-8">
                                    <input type="text" id="form-field-11-1" placeholder="请输入用户账号"
                                           class="form-control" name="uinfo" value="{$postArr.uinfo}">
                                </div>
                            </div>
                        </div>
                        <div class="col-lg-3 col-md-6 col-sm-12 col-xs-12 pad-b20">
                            <div class="form-group">
                                <label class="col-sm-3 control-label text-right no-padding-right"
                                       for="form-field-1-1">股票代码： </label>
                                <div class="col-sm-8">
                                    <input type="text" id="form-field-1-1" placeholder="请输入股票代码"
                                           class="form-control" name="stockno" value="{$postArr.stockno}">
                                </div>
                            </div>
                        </div>
                        <div class="col-lg-3 col-md-6 col-sm-12 col-xs-12 pad-b20">
                            <div class="form-group">
                                <label class="col-sm-3 control-label text-right no-padding-right"
                                       for="form-field-1-1">股票名称： </label>
                                <div class="col-sm-8">
                                    <input type="text" id="form-field-1-2" placeholder="请输入股票名称"
                                           class="form-control" name="stockname" value="{$postArr.stockname}">
                                </div>
                            </div>
                        </div>
                        <div class="col-lg-3 col-md-6 col-sm-12 col-xs-12 pad-b20 text-right">
                            <button type="submit" class="btn "
                                    style="width: 120px;    border-radius: 2rem; background: #fba40a!important;border-color: #fba40a;margin-left: 20px;">
                                查询
                            </button>
                        </div>
                    </form>
                    <div class="space"></div>
                    <div class="row">
                        <div class="col-xs-12">
                            <table id="sample-table-1"
                                   class="table table-hover">
                                <thead>
                                <tr>
                                    <th class="center">用户</th>
                                    <th class="center">股票代码</th>
                                    <th class="center">股票名称</th>
                                    <th class="center">持仓数量</th>
                                    <th class="center">持股均价</th>
                                    <th class="center">当前价格</th>
                                    <th class="center">市值</th>
                                </tr>
                                </thead>
                                <tbody>
                                <empty name="resList">
                                    <tr class="s_tr-vertical">
                                        <td colspan="7" class="center" style="color: red;">没有查询到结果</td>
                                    </tr>
                                </empty>
                                <volist  name="resList" id="vo">
                                    <tr class="s_tr-vertical">
                                        <td class="center">{$uRes[$vo[uid]].tel}({$uRes[$vo[uid]].rname})</td>
                                        <td class="center">{$sRes[$vo['sid']].sno}</td>
                                        <td class="center">{$sRes[$vo['sid']].sname}</td>
                                        <td class="center">{$vo.havenum}</td>
                                        <td class="center">{$vo.avg_price}</td>
                                        <egt name="vo.avg_price" value="$tdRes[$vo['sid']]">
                                            <td class="center" style="color:#4cae4c">{$tdRes[$vo['sid']]}</td>
                                        <else/>
                                            <td class="center" style="color:red">{$tdRes[$vo['sid']]}</td>
                                        </egt>
                                        <td class="center">{$vo[havenum]*$tdRes[$vo['sid']]||round=2}</td>
                                    </tr>
                                </volist>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
            <div class="text-center">
                {$pageShow}
            </div>
        </div>
    </div>
    <script>
        laydate.render({
            elem: '#start' //指定元素
        });
        laydate.render({
            elem: '#end' //指定元素
        });
    </script>
</block>